package cn.cdeden.resource.controller;


import cn.cdeden.common.core.domain.R;
import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.common.mybatis.core.page.PageQuery;
import cn.cdeden.resource.domain.dto.FilePrintLogDto;
import cn.cdeden.resource.domain.dto.FilePrintLogQueryParam;
import cn.cdeden.resource.service.FilePrintLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* @author GW
* @date 2024-05-23
**/
@RestController
@RequiredArgsConstructor
//@Api(tags = "打印管理管理")
@RequestMapping("/api/filePrintLog")
public class FilePrintLogController {

    private final FilePrintLogService filePrintLogService;

    @GetMapping
//    @Log("查询打印管理")
//    @ApiOperation("查询打印管理")
    public R<TableDataInfo<FilePrintLogDto>> query(FilePrintLogDto query, PageQuery pageQuery){
        return R.ok(filePrintLogService.queryAll(query,pageQuery));
    }

/*
    @PostMapping
    @Log("新增打印管理")
    @ApiOperation("新增打印管理")
    public BaseRespResult create(@Validated @RequestBody FilePrintLogDto resources){
        return BaseRespResult.successResult(filePrintLogService.insert(resources));
    }

    @PutMapping
    @Log("修改打印管理")
    @ApiOperation("修改打印管理")
    public BaseRespResult update(@Validated @RequestBody FilePrintLogDto resources){
        return BaseRespResult.successResult(filePrintLogService.updateById(resources));
    }

    @DeleteMapping
    @Log("删除打印管理")
    @ApiOperation("删除打印管理")
    public BaseRespResult delete(@RequestBody Set<String> ids) {
        return BaseRespResult.successResult(filePrintLogService.deleteByIds(ids));
    }
*/

    /*
    @Log("导出打印管理")
    @ApiOperation("导出打印管理")
    @GetMapping(value = "/download")
    @PreAuthorize("@el.check('filePrintLog:list')")
    public void download(HttpServletResponse response, FilePrintLogQueryParam query) throws IOException {
        filePrintLogService.download(filePrintLogService.queryAll(query), response);
    }*/

}
